<!-- 游戏配置 -->
<template>

  <!-- 游戏管理 -->
  <Game :show="show && !props.checkedItem.game_type" :showDisable="props.showDisable"
    :checkedItem="props.checkedItem" @onHideDetails="onHideDetails" />

  <!-- 老虎机(Slots) -->
  <Tiger :show="show && props.checkedItem.game_type == 1" :showDisable="props.showDisable" :showDefault="props.showDefault"
    :checkedItem="props.checkedItem" @onHideDetails="onHideDetails" />

  <!-- 百人(飞机) -->
  <Aircraft :show="show && props.checkedItem.game_type == 2 && props.checkedItem.game_id == 100001" :showDisable="props.showDisable"
    :checkedItem="props.checkedItem" @onHideDetails="onHideDetails" />
  <!-- 百人(大逃杀) -->
  <BattleRoyale :show="show && props.checkedItem.game_type == 2 && props.checkedItem.game_id == 100002" :showDisable="props.showDisable"
    :checkedItem="props.checkedItem" @onHideDetails="onHideDetails" />
  <!-- 百人(Luck49) -->
  <Luck :show="show && props.checkedItem.game_type == 2 && props.checkedItem.game_id == 100003" :showDisable="props.showDisable"
    :checkedItem="props.checkedItem" @onHideDetails="onHideDetails" />

  <!-- 街机(扫雷) -->
  <Sweep :show="show && props.checkedItem.game_type == 4" :showDisable="props.showDisable"
    :checkedItem="props.checkedItem" @onHideDetails="onHideDetails" />

</template>

<script lang="ts" setup>
import { ref, reactive, watch, computed, unref } from 'vue'
import Game from '@/views/configManage/components/game.vue'
import Tiger from '@/views/configManage/components/Tiger.vue'
import Sweep from '@/views/configManage/components/Sweep.vue'
import Aircraft from '@/views/configManage/components/Aircraft.vue'
import BattleRoyale from '@/views/configManage/components/BattleRoyale.vue'
import Luck from '@/views/configManage/components/Luck.vue'

const props = defineProps({
  show: {
    type: Boolean,
    default: () => {
      return false
    }
  },
  showDefault: {
    type: Boolean,
    default: () => {
      return false
    }
  },
  showDisable: {
    type: Boolean,
    default: () => {
      return false
    }
  },
  checkedItem: {
    type: Object,
    default: () => {
      return {}
    }
  }
})

// 重置
const emit = defineEmits(['onHideDetails'])
const onHideDetails = (show:boolean) => {
  emit('onHideDetails', show)
}
</script>

<style scoped lang="scss"></style>
